package com.hospital.diagnosis.module.mapper;

import com.hospital.common.pojo.TChatLog;
import com.hospital.common.pojo.TChatSession;
import com.hospital.common.pojo.TDepartment;
import com.hospital.diagnosis.module.vo.DoctorVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ChatMapper
{
    List<TDepartment> getDepartments();

    List<DoctorVo> getDoctors(@Param("departmentId") Long departmentId);

    List<Double> getDoctorCost(@Param("doctorId") Long doctorId);

    void archiveChatSession(TChatSession chatSession);

    void archiveChatLog(TChatLog chatLog);

    List<TChatSession> getArchivedChats(@Param("userId") Long userId);

    String getUserNameById(@Param("userId") Long userId);

    List<TChatLog> getChatLogsBySessionId(@Param("sessionId") String sessionId);

    List<DoctorVo> getAllDoctors(@Param("departmentId") Long departmentId);

    List<TChatSession> getALLArchivedChats(@Param("doctorId") Long doctorId,
                                           @Param("patientName") String patientName,
                                           @Param("startTime") String startTime,
                                           @Param("endTime") String endTime,
                                           @Param("startRow") Integer startRow,
                                           @Param("pageSize") Integer pageSize);

    Integer getALLArchivedChatsCount(@Param("doctorId") Long doctorId,
                                     @Param("patientName") String patientName,
                                     @Param("startTime") String startTime,
                                     @Param("endTime") String endTime);
}
